home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
util
/
conv
/
i2db12.lha
/
I2DB
/
I2DB-12.doc
< prev
next >
Wrap
Text File
|
1995-10-29
|
9KB
|
275 lines
**********************************************
* I2DB - Customizable Aminet Index Converter *
**********************************************
Introduction
------------
A few months ago I uploaded 2 programs to Aminet : I2SB and I2SQL.
Their purpose was to convert an Aminet Index to Superbase (I2SB)
and SQL (I2SQL) import format. But they had many drawbacks : they
were slow, a little bugged and rigid. So if you use them you can
delete them now ! ;-)
Seriousely I am a student so I didn't have the time to correct them.
But I am now on summer hollyday so I have a lot of free time.
I2DB is a converter for Aminet Indexes. You'll surely wonder "A converter
to WHICH format ?", won't you ? Well it converts the index to ANY format.
Using external module you can tell I2DB how the data should be written.
As examples I have included two modules : one for Superbase Personal
(1988 version) and one for SQL (you may see now why I said you could erase
I2SB and I2SQL).
Moreover I2DB can convert an Aminet CD ROM Index file to the format used
by AST (Aminet Search Tool), a great program written by Arne Meyer. It could
be useful if you want to include the index of your new Aminet CD ROM in the
AST list of the previous ones (I had to do this because the list contains
indexes from CD 2 to CD 6 and I had received my CD 7).
Features
--------
Here comes the list of I2DB's advantages :
- Customizable
- Fast
- AST support
- Needless spaces removed
- Conflicting caracters remplaced
- Automatic detection of fields' size
- Calculation of suggested size for fields in the database
Installation
------------
I think I could say it is very easy. Just put I2DB where you want. :-))
Required
--------
Amiga 4000 T with 68060, 20 MB of free RAM and 2 hard drives of 1 GB ;-)
Hey I was joking ! Don't be afraid !
Seriousely it should work on every Amiga with Dos.library V37 or newer and
some memory (1 or 2 MB should be sufficient but I'm not sure).
You also need an Aminet Index with 5 fields of any size (network or CD ROM).
Usage
-----
From CLI : Usage : I2DB [ -in <Index name> ] [ -out <Output file name> ]
[ -cd <CD number> ] [-ast <CD number>]
-cfg <Config file name>
* "Index name" is the name of the Index file with its path (example : Work:MyIndex).
If you don't specify it I2DB will search the file INDEX in its working directory
and it will stop if it doesn't find it.
* "Output file name" is the name of the file which will contain the converted index
with its path (example : Ram:MessyASCIIFile). If you don't specify it I2DB will
use standard output (generally the screen).
* "CD Number" (for -cd) is an optionnal field which can be added to the conversion.
If you are converting a CD ROM Index you specify here its number and it will be
added before the file name of each archive.
* "CD Number" (for -ast) will turn on the AST conversion on. The format of -cfg will
be ignored and the Index will be converted to an AST one. This format features :
- 2 more caracters for the File name
- The + for the long readme is after the size
- The number of the CD is inserted instead of the
age of the archives.
* "Config file name" is the name of the external module used for the conversion.
It must be present except for an AST conversion.
After a conversion (not an AST one) I2DB will display some values which are the maximal
sizes found for each field. You can enter these values for fields' size when creating
your database and it will exactly fit with the converted index.
Examples
--------
* Conversion of the file Work:Tmp/Index7 using the Superbase module :
I2DB -in Work:Tmp/Index7 -cfg Superbase.I2DB
* The same but to the file Ram:InputFile :
I2DB -in Work:Tmp/Index7 -out Ram:InputFile -cfg Superbase.I2DB
* The same but with the CD number 7
I2DB -in Work:Tmp/Index7 -out Ram:InputFile -cfg Superbase.I2DB -cd 7
* Conversion of Work:Tmp/Index7 into AST format
I2DB -in Work:Tmp/Index7 -ast 7
NB : "-cd" and "-ast" options are mutually exclusive. If one is found the second
is ignored.
External Module
---------------
The modules are built like this :
%% <Name> module for I2DB
%% CD Format
<cars>%<cars>%<cars>%<cars>%<cars>%<cars>%<cars>
%% Normal Format
<cars>%<cars>%<cars>%<cars>%<cars>%<cars>
%% Caracters which must be removed
<rcars> <rcars>
%% Caracters which must be inserted instead of the previous ones
<icars> <icars>
%% End of module
Now a little explanation :
* <Name> will be replaced by the name of the Database program (Ex : Superbase)
* <cars> are caracters used by the conversion. The '%' represents the value of the
field in the index. Let's see that with an example :
Just imagine that the line is Klondike.lha game/think 123K 2 Great Card Game
If you want your line to be "Klondike.lha","game/think","123K","2","Great Card Game"
you'll have to enter the following format line : "%","%","%","%","%"
The format line must be entered twice : the first has another field which is the
optionnal CD ROM number. In our example it would be "%","%","%","%","%","%"
* <rcars> are caracters which cannot be in the converted file. This could happen
if there is a conflict between the input format of the database program and a
caracter in a field. So just type there caracters which should be replaced
with a space between them.
Example : To remove " and # the line is " #
* <icars> are the caracters which are inserted instead of the removed ones. The
line format is the same and the positions must be the same two.
WARNING !
- The module must have exactly the same format that the included ones.
Don't remove the lines beginning with %% !
- The number of removed caracters and inserted ones must be the same.
- I2DB has been created for Aminet Indexes. Other files won't work !
If you don't do that I2DB will react in a VERY strange way......
History
-------
August 1995 Version 1.0 First release
September 1995 Version 1.1 Memory allocation problem
fixed (I think ;-) )
New output routines
(Unreleased version)
October 1995 Version 1.2 Conversion rewritten because
of a huge problem with some
indexes.
Tests
-----
I2DB has been created and tested on an Amiga 1200 with a Blizzard 1220/4 expansion
card. Here are two examples of its speed :
File Length Time
---- ------ ----
Aminet Index (29 Sept 95) 1559222 bytes 17 seconds
Aminet CD 8 Index 261937 3 seconds
The command lines are :
I2DB -in Netindex -out ram:Conv -cfg SuperBase.I2DB
I2DB -in Index8 -out ram:Conv -cfg SuperBase.I2DB
Disclaimer
----------
I2DB has been tested on my machine (see tests) and you use it at your own risks.
I can't be responsible for lost data due to its usage. With used algorithms it shouldn't
make damages.
Distribution
------------
I2DB is GIFTWARE. If you like it and use it you can send me something, according
to the value you give to I2DB (if you send me money please send me cash only).
I keep a copyright on this program. Public domain organisations and magazines
are allowed to distribute it if the archive remains intact (don't hack I2DB) and
if the price of the support is normal. France Festival Distribution WILL NEVER
BE ALLOWED TO DISTRIBUTE THIS PROGRAM.
Of course Aminet is allowed to distribute it and to put it on an Aminet CD ROM :-)
Author
------
I2DB has been created by :
Franck Aniere
30 Rue Jean Bouin
93220 GAGNY (France)
E-Mail : aniere@univ-mlv.fr
IRC : nickname FSA on the channel #amigafr (sometimes #amiga)
You can join me for any suggestions, bug reports, enforcer hits (I have no MMU)
or just to tell me what do you think of it.
If you find a bug or if I2DB doesn't work with your files contact me and and I'll
fix the problem quickly. Instead of writting another program if mine doesn't work
with you just tell me what do you want in it and I'll see if I add this feature.
By the way if you create cool external modules for I2DB please send them to me
and I will include them in the next versions of I2DB (with your name of course).
Thanks
------
Arne Meyer for AST, the greatest Aminet search tool (I use it everyday).
Gerard Marie, for the memory allocation bug found.
Adriano De Minicis, for the conversion bug found.
Amiga creators, for such a wonderful computer.
To do
-----
I wait for your suggestions..... ;-)